package com.ruoyi.wechat.service.impl;

import java.util.List;

import com.ruoyi.common.utils.uuid.UUID;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wechat.mapper.FacilityMapper;
import com.ruoyi.wechat.domain.Facility;
import com.ruoyi.wechat.service.IFacilityService;

/**
 * 服务设施管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-12
 */
@Service
public class FacilityServiceImpl implements IFacilityService 
{
    @Autowired
    private FacilityMapper facilityMapper;

    /**
     * 查询服务设施管理
     * 
     * @param facilityId 服务设施管理主键
     * @return 服务设施管理
     */
    @Override
    public Facility selectFacilityByFacilityId(String facilityId)
    {
        return facilityMapper.selectFacilityByFacilityId(facilityId);
    }

    /**
     * 查询服务设施管理列表
     * 
     * @param facility 服务设施管理
     * @return 服务设施管理
     */
    @Override
    public List<Facility> selectFacilityList(Facility facility)
    {

        return facilityMapper.selectFacilityList(facility);
    }

    /**
     * 新增服务设施管理
     * 
     * @param facility 服务设施管理
     * @return 结果
     */
    @Override
    public int insertFacility(Facility facility)
    {
        facility.setFacilityId(UUID.randomUUID().toString());
        return facilityMapper.insertFacility(facility);
    }

    /**
     * 修改服务设施管理
     * 
     * @param facility 服务设施管理
     * @return 结果
     */
    @Override
    public int updateFacility(Facility facility)
    {
        return facilityMapper.updateFacility(facility);
    }

    /**
     * 批量删除服务设施管理
     * 
     * @param facilityIds 需要删除的服务设施管理主键
     * @return 结果
     */
    @Override
    public int deleteFacilityByFacilityIds(String[] facilityIds)
    {
        return facilityMapper.deleteFacilityByFacilityIds(facilityIds);
    }

    /**
     * 删除服务设施管理信息
     * 
     * @param facilityId 服务设施管理主键
     * @return 结果
     */
    @Override
    public int deleteFacilityByFacilityId(String facilityId)
    {
        return facilityMapper.deleteFacilityByFacilityId(facilityId);
    }
}
